//function _columns(a)
//{
//    document.write('<style type="text/css"> .column_ { position: fixed; ' +
//            'z-index: 999; top: 0; display: block; height: 100%;' +
//            'border-right: 1px dashed #4affff; }' +
//            '* html .column_ {position: absolute; } </style>');
//
//    for (var i = 0, l = a.length; i < l; i++)
//        document.write('<span class="column_" style="left: ' + a[i] + '%"></span>');
//}

//_columns([2, 10, 18, 26, 34, 42, 50, 58, 66, 74, 82, 90, 98]);

function comment_color_change(obj, c)
{
    switch (c) {
      case "w":
        c = "#fff"
        break
      case "b":
        c = "#cae8ec"
        break
      case "h":
        c = "#e5e6c8"
        break
      case "g":
        c = "#d8e8cc"
        break
      case "t":
        c = "none"
        break
    }
    $("#comments").css("background", c);
    $(".color_change_selector").removeClass("color_change_selector_selected");
    $(obj).find(".color_change_selector").addClass("color_change_selector_selected");
}

$(document).ready(function() {
    $(".action_popup").bind({
        mouseenter: function() {
            pp = $("#" + $(this).parent().attr("id") + "_popup");
            pp.stop(true, true).fadeIn(80);
        },
        mouseleave: function() {
            pp = $("#" + $(this).parent().attr("id") + "_popup");
            pp.delay(100).fadeOut(80);
        }
    });
    $(".popup_wrap").bind({
        mouseenter: function() {
            pp = $(this);
            pp.stop(true, true).show();
        },
        mouseleave: function() {
            pp = $(this);
            pp.stop(true, true).delay(100).fadeOut(80);
        }
    });

    var default_value = $(".search_input").val();
    var default_class = "search_input";
    $(".search_input").focus(function(){
        if ($(this).val() == default_value) {
            $(this).val("");
            $(this).addClass("search_input_act");
        };
    });
    $(".search_input").blur(function(){
        if ($(this).val() == "") {
            $(this).val(default_value);
            $(this).removeClass("search_input_act");
        }
    });
});
